package com.action;

import java.util.List;

import com.opensymphony.xwork2.ActionContext;
import com.pojo.ProdCls;
import com.service.ProdService;

public class ProductAction {
	private ProdService prodService;

	public ProdService getProdService() {
		return prodService;
	}

	public void setProdService(ProdService prodService) {
		this.prodService = prodService;
	}
	
	public String getAllProducts(){
		List<ProdCls> list=prodService.getAllProduct();
        ActionContext.getContext().put("list", list);
		for (ProdCls prodCls : list) {
			System.out.println(prodCls.getProdClsId()+"\t"+prodCls.getProdName());
		}
		return "show";
	}
	

}
